package com.qdl.rym.system.mapper;

import com.qdl.rym.base.Mapper;
import com.qdl.rym.system.dto.AlbumDTO;
import com.qdl.rym.system.po.Album;
import com.qdl.rym.system.po.FileRecord;
import org.apache.ibatis.annotations.Param;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * @Description: AlbumMapper
 * @Author: ChenXueLi
 * @Date: 2019/3/19 14:40
 * 你是一段成熟的代码，要学会自己改bug
 */
public interface AlbumMapper extends Mapper<Album> {

    /**
     * 插入数据
     * @param album
     * @return
     * @throws SQLException
     */
    int addAlbum(Album album) throws SQLException;

    /**
     * 根据id查询信息
     * @param albumId
     * @return
     * @throws SQLException
     */
    AlbumDTO getAlbumDTOById(@Param("albumId")Integer albumId) throws SQLException;

    /**
     * 查询列表信息
     * @param map
     * @return
     * @throws SQLException
     */
    List<AlbumDTO> getAlbums(Map<String, Object> map) throws SQLException;

    /**
     * 根据id列表查询信息
     * @param list
     * @return
     * @throws SQLException
     */
    List<AlbumDTO> getAlbumsByIdList(List<Integer> list) throws SQLException;

    /**
     * 修改信息
     * @param album
     * @return
     * @throws SQLException
     */
    int updateAlbum(Album album) throws SQLException;

    /**
     * 删除信息
     * @param album
     * @return
     * @throws SQLException
     */
    int deleteAlbum(Album album) throws SQLException;

}
